package com.ruoyi.smile.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.smile.mapper.McBeFocusedMapper;
import com.ruoyi.smile.domain.McBeFocused;
import com.ruoyi.smile.service.IMcBeFocusedService;

/**
 * 关注Service业务层处理
 * 
 * @author xin
 * @date 2025-03-18
 */
@Service
public class McBeFocusedServiceImpl implements IMcBeFocusedService 
{
    @Autowired
    private McBeFocusedMapper mcBeFocusedMapper;

    /**
     * 查询关注
     * 
     * @param id 关注主键
     * @return 关注
     */
    @Override
    public McBeFocused selectMcBeFocusedById(Long id)
    {
        return mcBeFocusedMapper.selectMcBeFocusedById(id);
    }

    /**
     * 查询关注列表
     * 
     * @param mcBeFocused 关注
     * @return 关注
     */
    @Override
    public List<McBeFocused> selectMcBeFocusedList(McBeFocused mcBeFocused)
    {
        return mcBeFocusedMapper.selectMcBeFocusedList(mcBeFocused);
    }

    /**
     * 新增关注
     * 
     * @param mcBeFocused 关注
     * @return 结果
     */
    @Override
    public int insertMcBeFocused(McBeFocused mcBeFocused)
    {
        mcBeFocused.setCreateTime(DateUtils.getNowDate());
        return mcBeFocusedMapper.insertMcBeFocused(mcBeFocused);
    }

    /**
     * 修改关注
     * 
     * @param mcBeFocused 关注
     * @return 结果
     */
    @Override
    public int updateMcBeFocused(McBeFocused mcBeFocused)
    {
        mcBeFocused.setUpdateTime(DateUtils.getNowDate());
        return mcBeFocusedMapper.updateMcBeFocused(mcBeFocused);
    }

    /**
     * 批量删除关注
     * 
     * @param ids 需要删除的关注主键
     * @return 结果
     */
    @Override
    public int deleteMcBeFocusedByIds(Long[] ids)
    {
        return mcBeFocusedMapper.deleteMcBeFocusedByIds(ids);
    }

    /**
     * 删除关注信息
     * 
     * @param id 关注主键
     * @return 结果
     */
    @Override
    public int deleteMcBeFocusedById(Long id)
    {
        return mcBeFocusedMapper.deleteMcBeFocusedById(id);
    }
}
